package com.xdtech.play.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.sql.Timestamp;

import com.xdtech.core.model.BaseItem;
import com.xdtech.core.orm.utils.BeanUtils;
import com.xdtech.play.model.PlayStart;

import com.xdtech.web.freemark.item.GridColumn;

/**
 * 
 * @author max.zheng
 * @create 2016-05-09 23:28:30
 * @since 1.0
 * @see
 */
public class PlayStartItem extends BaseItem implements Serializable{
	private static final long serialVersionUID = 1L;
	@GridColumn(title="庄家名称",width=100)
	private String memberName;
//	@GridColumn(title="庄家ID",width=100)
	private Long memberId;
	@GridColumn(title="开庄金额",width=100)
	private Integer account;
	@GridColumn(title="开始时间",width=120)
	private String startTime;
	@GridColumn(title="结束时间",width=120)
	private String endTime;
	@GridColumn(title="耗时分钟",width=80)
	private Integer takeTime;
	@GridColumn(title="结果状态",width=80)
	private String resultStatus;
	@GridColumn(title="操作人",width=100)
	private String operator;
	private Long id;

	public void setMemberName(String memberName) {
		this.memberName = memberName;
		addQuerys("memberName", memberName);
	}
	public String getMemberName() {
		return memberName;
	}
	
	public void setMemberId(Long memberId) {
		this.memberId = memberId;
		addQuerys("memberId", memberId);
	}
	public Long getMemberId() {
		return memberId;
	}
	
	public void setAccount(Integer account) {
		this.account = account;
		addQuerys("account", account);
	}
	public Integer getAccount() {
		return account;
	}
	
	public void setResultStatus(String resultStatus) {
		this.resultStatus = resultStatus;
		addQuerys("resultStatus", resultStatus);
	}
	public String getResultStatus() {
		return resultStatus;
	}
	
	public void setOperator(String operator) {
		this.operator = operator;
		addQuerys("operator", operator);
	}
	public String getOperator() {
		return operator;
	}
	
	public void setStartTime(String startTime) {
		this.startTime = startTime;
		addQuerys("startTime", startTime);
	}
	public String getStartTime() {
		return startTime;
	}
	
	public void setEndTime(String endTime) {
		this.endTime = endTime;
		addQuerys("endTime", endTime);
	}
	public String getEndTime() {
		return endTime;
	}
	
	public void setTakeTime(Integer takeTime) {
		this.takeTime = takeTime;
		addQuerys("takeTime", takeTime);
	}
	public Integer getTakeTime() {
		return takeTime;
	}
	
	public void setId(Long id) {
		this.id = id;
		addQuerys("id", id);
	}
	public Long getId() {
		return id;
	}
	
	/**
	 * 根据model构建vo
	 * 
	 * @author max
	 * @return
	 */
	public static PlayStartItem createItem(PlayStart playStart) {
		PlayStartItem playStartItem = null;
		if(playStart!=null) {
			playStartItem = new PlayStartItem();
			BeanUtils.copyProperties(playStartItem, playStart);
			//自定义属性设置填充
		}
		
		return playStartItem;
	}
	/**
	 * 根据model集合创建vo集合
	 * 
	 * @author max
	 * @return
	 */
	public static List<PlayStartItem> createItems(List<PlayStart> playStarts) {
		List<PlayStartItem> playStartItems = new ArrayList<PlayStartItem>();
		for (PlayStart playStart : playStarts) {
			playStartItems.add(createItem(playStart));
		}
		return playStartItems;
	}
}
